package edu.ccut.saturn.basecomponent.dataoperationcomponent;

import java.util.List;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IParameter;
import edu.ccut.saturn.component.IParameterContext;
public class SetValues extends DefaultComponent {

	public void execute(IParameterContext parameterContext) throws Exception {
		List<IParameter> params = parameterContext.getParameters();
		for(int i=0;i<(params.size()%2==0?params.size():params.size()-1);i++){
			Object value = parameterContext.getParameterValue(i);
			parameterContext.setParameter(++i, value);
			debug("setValue======="+value, parameterContext);
		}
	}
}
